﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DXApplicationTangche.UC.项目成果管理.service;

namespace DXApplicationTangche.UC.订单一览新.改版
{
    public partial class Form改版申请 : DevExpress.XtraEditors.XtraForm
    {
        private String batchNo;
        public Form改版申请(String batchNo)
        {
            InitializeComponent();
            this.batchNo = batchNo;
        }

        private void simpleButton确认_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(this.textBox员工号.Text) || String.IsNullOrWhiteSpace(this.richTextBox改版原因.Text))
            {
                MessageBox.Show("请扫描员工牌并填写申请改版原因");
                return;
            }
            //判断扫描的工牌是否正确
            String mnemonic = 项目成果Service.get判断扫描员工码是否正确(this.textBox员工号.Text.Trim());
            if (String.IsNullOrWhiteSpace(mnemonic))
            {
                this.textBox员工号.Clear();
                MessageBox.Show("扫描员工码错误，请重新扫描");
                return;
            }
            String re = 
                改版Service.get生成改版信息(
                    this.textBox员工号.Text.Trim(),
                    this.batchNo,
                    this.richTextBox改版原因.Text.Trim()
                    );
            MessageBox.Show("操作完成");
            this.Close();
        }
    }
}